/**
 *
 */
package org.jim.core.packets.cs.user.command;

import org.jim.core.packets.pub.consts.Command;
import org.jim.core.packets.Message;

/**
 * 版本: [1.0]
 * 功能说明: 登陆命令请求包体
 * 作者: WChao 创建时间: 2017年9月12日 下午3:13:22
 */
public class LoginReqCmd extends Message {

    private static final long serialVersionUID = -10113316720288444L;
   /* *//**
     * 应用Key
     *//*
    @NotBlank
    private String appKey;
*/
    /**
     * 用户Id
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 登陆token(这个是有rest接口登陆后产生的token,使用appKey+username+password登录是一个效果,二者任选一)
     */
    private String token;

    public LoginReqCmd() {
    }

    public LoginReqCmd(String token) {
        this.token = token;
        this.cmd = Command.COMMAND_LOGIN_REQ.getNumber();
    }

    public LoginReqCmd(String username, String password) {
        this.username = username;
        this.password = password;
        this.cmd = Command.COMMAND_LOGIN_REQ.getNumber();
    }

    public LoginReqCmd(String username, String password, String token) {
        this(username, password);
        this.token = token;
    }


   /* public String getAppKey() {
        return appKey;
    }

    public LoginReqCmd setAppKey(String appKey) {
        this.appKey = appKey;
        return this;
    }*/

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
